package server;

import shared.DefaultInterface;
import global.ShareDefine;

public class Server {

	public static void main(String[] args){
		NettyServer server = new NettyServer(ShareDefine.context, "127.0.0.1", 7777);
		server.getInvoker().mapInterface(DefaultInterface.class, new DefaultInterface(){
			@Override
			public int defaultMethod(int i) {
				System.out.println(i);
				return 0;
			}

			@Override
			public int firstMethod(int i) {
				System.out.println(i);
				return 0;
			}

			@Override
			public int secondMethod(int i) {
				System.out.println(i);
				return 0;
			}

			@Override
			public int thirdMethod(int i) {
				System.out.println(i);
				return 0;
			}
		});
		server.startUp();
	}
}
